#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
Copyright (C) 2025 粤港澳大湾区（广东）国创中心

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

File: PyGMDE_Main.py
Desc: Main entry point for the PyGMDE application.
Author: xumanjia
Date: 2025-08-01
"""

import sys
from Pub.configLoad import global_scope
from PyQt5.QtWidgets import QApplication, QDesktopWidget
from Pub.CAEMainWindow import MainWindow # type: ignore
from PyQt5.QtCore import QRect

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = MainWindow()
    if False == hasattr(window,"NCTI"):
        sys.exit()
    # 居中显示
    window_center = QDesktopWidget().availableGeometry().center()
    qr = window.frameGeometry()
    qr.moveCenter(window_center)
    window.move(qr.topLeft())
    window.show()
    sys.exit(app.exec_())

